home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / ASM32PM.ZIP / STUFF.DOC < prev   
Text File  |  1993-06-07  |  3KB  |  65 lines

  1.   First of all. If you had PMODE v1.29a, you might have noticed there were a
  2. few typos in the doc and example programs. It also didn't seem to want to
  3. compile with TASM 3.2 (been fixed here (I hope (I don't have 3.2))). So if
  4. you've had a bad experience with 1.29a, try this, it might work... or not...
  5.  
  6.   This is the PMODE protected mode code raw, XMS, VCPI, and DPMI compliant
  7. header thingy. The files are:
  8.  
  9.   STUFF.DOC       - this annoying doc
  10.   PMODE.ASM       - the actual protected mode header
  11.   PMODE.INC       - externs for PMODE.ASM defined
  12.   PMODE.DOC       - instructions on PMODE.ASM
  13.   FILE.ASM        - just a quickie file library
  14.   FILE.INC        - all externs for file library
  15.   EXAMPLE.ASM     - protected mode example program
  16.   MAKEEX.BAT      - this batch file will make the example program. PMODE
  17.                     was coded under TASM 3.0. Just thought I'd tellya if you
  18.                     have a different compiler and it doesn't compile it.
  19.  
  20.   PMODE.DOC only explains coding with PMODE.ASM. Read that, then get back here
  21. and you will understand the explanation for FILE.ASM that follows.
  22. (Its just an old lib that I quickly fixed up a little and included)
  23.  
  24. ------------------------------------------------------------------------------
  25. FILE:
  26. -----
  27.  
  28.   This is a basic library of some file functions. They are:
  29.  
  30.     _openfile   - I think this is self-explanatory.
  31.     _readfile   - ditto.
  32.     _writefile  - gee... what could this possibly be???
  33.     _createfile - I don't know...
  34.     _deletefile - summons the devil...
  35.     _findfile   - ok, this one is the same as DOS int 21h functions 4eh, and
  36.                   4fh (AL specifies which one upon entry).
  37.     _lseekfile  - same as int 21h function 42h.
  38.     _filesize   - returns the size of and opened file.
  39.     _filecopy   - copies ECX bytes from one open file to another.
  40.     _closefile  - guess...
  41.  
  42.   To get a slightly better description of these functions, check out FILE.ASM
  43. itself.
  44.  
  45.   Most of the functions will work immediately, without any setting up of
  46. anything by your program. However ... If you wish to read or write to a memory
  47. address that is above 1M, you will have to set up an intermediate file buffer
  48. somewhere below 1M for FILE to use (Remember, plain DOS can't talk to memory
  49. above 1M)... Also, '_filecopy' always requires this buffer. But this is no
  50. problem, setting up this buffer is easy. There are two variables that specify
  51. the location and size of this buffer. '_filebufloc' is a pointer to the buffer
  52. area somewhere in low memory. Your program must initialize this pointer, but
  53. you may modify it to point to a default area within your code. '_filebuflen'
  54. is the length of this buffer. 4000h bytes by default, but you may change it at
  55. compile time and run time.
  56.  
  57.   One thing to note. At the top of FILE.ASM, there are several lines commented
  58. out. If you wish to use a function other than '_closefile', you must uncomment
  59. that file's token string in FILE before compiling it. This is merely because
  60. I don't like to waste code space, and include only what has to be included.
  61. If you don't want to bother, simply uncomment all these lines, and leave it
  62. like that, and all these functions be available without you having to edit
  63. FILE.ASM every time you want to use it.
  64.  
  65.